<template>
  <div class="city">
    <city-header></city-header>
    <city-list :cities='cities' :hotCities='hotCities'></city-list>
  </div>
</template>

<script>
import CityHeader from "./pages/Header";
import CityList from "./pages/List";
export default {
  data(){
    return {
      hotCities:[],
      cities:{}
    }
  },
  components: {
    CityHeader,
    CityList,
  },
  mounted() {
    this.$http.get("http://localhost:8080/static/mock/city.json")
    .then((res)=>{
      let data = res.data.data;
      this.hotCities = data.hotCities;
      this.cities = data.cities
    })
  },
};
</script>

<style scoped>
</style>